---
description: How to get started using the Plasmo Framework to build your browser extension.
---

import { Bleed, Callout } from "nextra-theme-docs"

# Create a New Extension

To run the interactive initialization wizard, use the following command:

```sh
pnpm create plasmo
# OR
yarn create plasmo
# OR
npm create plasmo
```

To skip the naming prompt, supply a name as a positional argument:

```sh
pnpm create plasmo "My Awesome Extension"
# OR
yarn create plasmo "My Awesome Extension"
# OR
npm create plasmo "My Awesome Extension"
```

<Callout type="info" emoji="⭐">

**NOTE:** you can install the plasmo CLI as a global command with `pnpm i -g plasmo` (switch `pnpm` with your favorite package manager).

</Callout>

## With src directory

By default, Plasmo expects all source code to be in the root directory. However, you can follow [this guide](/framework/customization/src) to use the `src` directory as the home for your source code.

## With specific entry files

The default project contains just a [popup](/framework/ext-pages#adding-a-popup-page) entry file. However, you can customize this behavior by using the `entry` flag with a comma-separated list of entry files to include in your initial project.

To use this flag, pick the entry files you would like to see in your project, omit its file extension, and supply it to the `--entry` flag:

There are many entry files to choose from. Check out [this directory](https://github.com/PlasmoHQ/plasmo/tree/main/packages/init/entries) to see all the different entry files available to you.

```sh
pnpm create plasmo --entry=options,newtab,contents/inline
# OR
npm create plasmo -- --entry=options,newtab,contents/inline
```

The command above will create a project with the [options page](/framework/ext-pages#adding-the-options-ui), a [newtab page](/framework/ext-pages#adding-a-new-tab-page), and an [inline content script UI](/framework/content-scripts-ui).

<Callout type="warning" emoji="⚠️">

**NOTE**: `npm` does not pass arguments down to its child command. Thus, you must supply a `--` to escape `npm` before specifying plasmo's parameters and flags.

</Callout>

## With an example template

Even more powerful, Plasmo can create a new project based on one of [our examples](https://github.com/PlasmoHQ/examples/). Pick an example, and use its name as a flag when running the `create plasmo` command:

```sh
pnpm create plasmo --with-env
# OR
npm create plasmo -- --with-env
```

The above will generate a project using the [with-env](https://github.com/PlasmoHQ/examples/tree/main/with-env) example.
